package com.itheima.exerciseTest.test20_29;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;

public class Test23 {
    public static void main(String[] args) {
        Date date = new Date();
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
//        String format = sdf.format(date);
//        System.out.println(format);


        DateFormat dateInstance = DateFormat.getDateInstance();
//        String format1 = dateInstance.format(date);
//        System.out.println(format1);
    }
}
